# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=caffeine-ng
pkgver=4.2.0
pkgrel=1
pkgdesc="Status bar application able to temporarily inhibit the screensaver and sleep mode"
url="https://codeberg.org/WhyNotHugo/caffeine-ng"
arch="noarch"
license="GPL-3.0-or-later"
depends="
	gtk+3.0
	libayatana-appindicator
	libnotify
	py3-click
	py3-dbus
	py3-ewmh
	py3-gobject3
	py3-pulsectl
	py3-setproctitle
	xdg-utils
	"
makedepends="
	gtk+3.0-dev
	libayatana-appindicator-dev
	libnotify-dev
	meson
	py3-dbus-dev
	py3-gobject3-dev
	python3-dev
	scdoc
	"
subpackages="$pkgname-doc $pkgname-lang"
source="caffeine-ng-$pkgver.tar.gz::https://codeberg.org/attachments/6da08199-604f-4f0f-b9dd-c50efe587965
	mandir.patch
	"
builddir="$srcdir/caffeine-ng-v4.2.0-0-g5027f55"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
ff732b56baa96f9f8eb0d05b502c56612cbd5a9c48c65820724c3abbb9ad4e2770997285cb0e4a1617cc5c70c8881a015451b4c00a6513daada97b93920a2cf8  caffeine-ng-4.2.0.tar.gz
b19bc62609dc77fb8da6ca6691fb2edfe99b1444119ecda15cad8bb79d832802e917249251f1d50127b394f80a443b3ae722a9a076f21a3563d1c007d833af09  mandir.patch
"
